/*
 * materialmanager.h
 *
 *  Created on: Jan 13, 2011
 *      Author: dima
 */

#ifndef MATERIALMANAGER_H_
#define MATERIALMANAGER_H_

#include <map>

#include "prerequisites.h"

#include "engine.h"
#include "material.h"

#define MAX_MATERIALS

class MaterialManager
{
	friend class Engine;

	MaterialManager();

	std::map<const char*, Material*> mMaterialMap;

	Material* materialList[MAX_MATERIALS];

public:
	virtual ~MaterialManager();

	void addMaterial(Material* material);
	void loadMaterial(const char* name);
	void loadAllMaterials();

	MaterialInstance* createMaterialInstance(const char* name, MaterialData* data);

};

#endif /* MATERIALMANAGER_H_ */
